package com.lc.index.controller.api;

import java.util.List;
import java.util.Map;
import javax.annotation.Resource;

import com.lc.common.annotation.Anonymous;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.lc.common.core.controller.BaseController;
import com.lc.index.domain.Chef;
import com.lc.index.service.ChefService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 存储厨师基本信息Controller
 *
 * @author autoGen
 * @date 2025-03-12
 */
@Api(value = "存储厨师基本信息", tags = "存储厨师基本信息")
@Anonymous
@RestController
@RequestMapping("api/index/chef")
public class ChefsCtrl extends BaseController {
    @Resource
    private ChefService chefService;



    /**
     * 获取厨师列表
     *
     * @return
     */
    @ApiOperation(value = "获取厨师列表", notes = "获取厨师列表")
    @GetMapping("/getChefList")
    public List<Chef> getChefList() {
        return chefService.getChefList();
    }

    /**
     * 根据id获取厨师信息
     *
     * @param params
     * @return
     */
    @ApiOperation(value = "根据id获取厨师信息", notes = "根据id获取厨师信息")
    @GetMapping("/getChefById")
    public Chef getChefById(Map<String, Integer> params) {
        Integer chefId = params.get("chefId");
        return chefService.getChefById(chefId);
    }
}
